
<h2> <?php echo $this->info['title'];?> </h2>
 
 
 <?php
 if (isset($this->message)){
        echo "<a class='ps-searchButton' id='allmesshref' href='/messages/'>Все сообщения</a>\n
        <ul id='mes'>\n
        <li class='mesFrom'> От кого : " . $this->message->getFromName() . "</li>\n
        <li class='mesToWho'> Кому : " . $this->message->getToWhoName() . "</li>\n
        <li class='mesData'> Сообщение : " . $this->message->getData() . "</li>\n
        <li class='mesTime'> Отправлено : " . date('Y-m-d H:i:s',$this->message->getTimeCreated()) . "</li>\n";        
?>        
        
        
<form method='post' enctype='application/x-www-from-urlencoded'>

<input class='hidden' type='hidden' name='toId' value='<?php 
if($this->message->getIsMyMessage() == true) {
    echo $this->message->getSendToId();
}  else {
    echo $this->message->getFromId();
}
?>
'>

<textarea  name='messageData' rows='6' cols='40' ></textarea><br>
<input  class='ps-searchButton' type='submit' name='messageSub' value='<?php 
if($this->message->getIsMyMessage() == true) {
    echo 'Написать ещё';
}  else {
    echo 'Ответить';
}
?>
'>
</form>

<?php       
echo '</ul>';    
 } else{
    echo "<span class='errors'>"; 
    if(isset($this->errors)) {
        echo $this->errors;
     }
    echo '</span>';
 }

